/**
 * @file LogLevel.h
 * @author  haifeng (haifengxiao@icloud.com)
 * @brief
 * @version 0.1
 * @date 2021-07-06
 *
 * @copyright Copyright (c) 2021
 *
 */

#pragma once

#include <string>

namespace Chen {
    namespace Log {

        class LogLevel {
        public:

            /**
             * @brief
             *
             */
            enum Level     {
                /// 未知级别
                UNKNOW = 0,
                /// DEBUG 级别
                DEBUG_ = 1,
                /// INFO 级别
                INFO = 2,
                /// WARN 级别
                WARN = 3,
                /// ERROR 级别
                ERROR = 4,
                /// FATAL 级别
                FATAL = 5
            };

            /**
             * @brief
             *
             * @param level
             * @return const char*
             */
            static const char* ToString(LogLevel::Level level);

            /**
             * @brief
             *
             * @param str
             * @return LogLevel::Level
             */
            static LogLevel::Level FromString(const std::string& str);
        };

    }//namespace Log
}//namespace Chen